package com.tanhua.app.controller;

import com.tanhua.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/huanxin")
public class HuanXinController {


    @GetMapping(value = "/user",name="给app返回当前用户的环信账号和密码")
    public ResponseEntity user() throws IOException {
        Map<String,String> map = new HashMap();
        map.put("username", UserHolder.getUser().getId().toString());
        map.put("password", "123456");
        return ResponseEntity.ok(map);
    }


    
}
